﻿@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@model ProfileViewModel
@{
    ViewBag.Title = "用户资料";
    var photoPath = $"~/img/user/{(@Model.Photo ?? "color_tree.jpg")}";
    //var photoPath = $"~/img/user/color_tree.jpg";
}
<img class="card-header" style="width:200px;" src=@photoPath asp-append-version="true" />
<div class="form-group">
    <label asp-for="UserName"></label>
    <label class="form-control">@Model.UserName</label>
</div>
<div class="form-group">
    <label asp-for="Email"></label>
    <label class="form-control">@Model.Email</label>
</div>
<div>
    <a asp-controller="profile" asp-action="EditProfile" asp-route-userName=@Model.UserName class="btn btn-primary">编辑</a>
    <a asp-controller="home" asp-action="index" class="btn btn-primary">返回</a>
</div>
